package com.xu.cloud.sample.api.apis;

import com.xu.cloud.common.api.ApiVersion;
import com.xu.cloud.common.api.XuApi;
import com.xu.cloud.common.api.XuApiMethod;
import com.xu.cloud.common.constant.HttpConstant;
import com.xu.cloud.common.idempotent.Idempotent;
import com.xu.cloud.sample.api.dto.IdempotentReq;
import com.xu.cloud.sample.api.dto.IdempotentResp;

/**
 * 幂等测试 api
 *
 * @author xuguan
 * @since 2025/3/18
 */
@XuApi(path = "/api")
@ApiVersion(version = HttpConstant.API_VERSION_V1)
public interface IdempotentApi {

    @Idempotent
    @XuApiMethod(apiCode = "IDEM0001",
            apiDesc = "幂等测试方法",
            path = "/idempotent/" + HttpConstant.API_VERSION_PLACEHOLDER,
            processorBeanName = "idempotentProcessor")
    IdempotentResp idempotent(IdempotentReq req);
}
